package events

import (
	pb "github.com/aquasecurity/tracee/api/v1beta1"
)

// EventTranslationTable translates internal event IDs to external protobuf Event IDs.
// This table maps built-in events (ID <= MaxBuiltinID) to their corresponding protobuf enum values.
// Events with ID > MaxBuiltinID are not translated and use their internal ID directly.
var EventTranslationTable = [MaxBuiltinID]pb.EventId{
	// syscall translation section
	Read:                  pb.EventId_read,
	Write:                 pb.EventId_write,
	Open:                  pb.EventId_open,
	Close:                 pb.EventId_close,
	Stat:                  pb.EventId_stat,
	Fstat:                 pb.EventId_fstat,
	Lstat:                 pb.EventId_lstat,
	Poll:                  pb.EventId_poll,
	Lseek:                 pb.EventId_lseek,
	Mmap:                  pb.EventId_mmap,
	Mprotect:              pb.EventId_mprotect,
	Munmap:                pb.EventId_munmap,
	Brk:                   pb.EventId_brk,
	RtSigaction:           pb.EventId_rt_sigaction,
	RtSigprocmask:         pb.EventId_rt_sigprocmask,
	RtSigreturn:           pb.EventId_rt_sigreturn,
	Ioctl:                 pb.EventId_ioctl,
	Pread64:               pb.EventId_pread64,
	Pwrite64:              pb.EventId_pwrite64,
	Readv:                 pb.EventId_readv,
	Writev:                pb.EventId_writev,
	Access:                pb.EventId_access,
	Pipe:                  pb.EventId_pipe,
	Select:                pb.EventId_select,
	SchedYield:            pb.EventId_sched_yield,
	Mremap:                pb.EventId_mremap,
	Msync:                 pb.EventId_msync,
	Mincore:               pb.EventId_mincore,
	Madvise:               pb.EventId_madvise,
	Shmget:                pb.EventId_shmget,
	Shmat:                 pb.EventId_shmat,
	Shmctl:                pb.EventId_shmctl,
	Dup:                   pb.EventId_dup,
	Dup2:                  pb.EventId_dup2,
	Pause:                 pb.EventId_pause,
	Nanosleep:             pb.EventId_nanosleep,
	Getitimer:             pb.EventId_getitimer,
	Alarm:                 pb.EventId_alarm,
	Setitimer:             pb.EventId_setitimer,
	Getpid:                pb.EventId_getpid,
	Sendfile:              pb.EventId_sendfile,
	Socket:                pb.EventId_socket,
	Connect:               pb.EventId_connect,
	Accept:                pb.EventId_accept,
	Sendto:                pb.EventId_sendto,
	Recvfrom:              pb.EventId_recvfrom,
	Sendmsg:               pb.EventId_sendmsg,
	Recvmsg:               pb.EventId_recvmsg,
	Shutdown:              pb.EventId_shutdown,
	Bind:                  pb.EventId_bind,
	Listen:                pb.EventId_listen,
	Getsockname:           pb.EventId_getsockname,
	Getpeername:           pb.EventId_getpeername,
	Socketpair:            pb.EventId_socketpair,
	Setsockopt:            pb.EventId_setsockopt,
	Getsockopt:            pb.EventId_getsockopt,
	Clone:                 pb.EventId_clone,
	Fork:                  pb.EventId_fork,
	Vfork:                 pb.EventId_vfork,
	Execve:                pb.EventId_execve,
	Exit:                  pb.EventId_exit,
	Wait4:                 pb.EventId_wait4,
	Kill:                  pb.EventId_kill,
	Uname:                 pb.EventId_uname,
	Semget:                pb.EventId_semget,
	Semop:                 pb.EventId_semop,
	Semctl:                pb.EventId_semctl,
	Shmdt:                 pb.EventId_shmdt,
	Msgget:                pb.EventId_msgget,
	Msgsnd:                pb.EventId_msgsnd,
	Msgrcv:                pb.EventId_msgrcv,
	Msgctl:                pb.EventId_msgctl,
	Fcntl:                 pb.EventId_fcntl,
	Flock:                 pb.EventId_flock,
	Fsync:                 pb.EventId_fsync,
	Fdatasync:             pb.EventId_fdatasync,
	Truncate:              pb.EventId_truncate,
	Ftruncate:             pb.EventId_ftruncate,
	Getdents:              pb.EventId_getdents,
	Getcwd:                pb.EventId_getcwd,
	Chdir:                 pb.EventId_chdir,
	Fchdir:                pb.EventId_fchdir,
	Rename:                pb.EventId_rename,
	Mkdir:                 pb.EventId_mkdir,
	Rmdir:                 pb.EventId_rmdir,
	Creat:                 pb.EventId_creat,
	Link:                  pb.EventId_link,
	Unlink:                pb.EventId_unlink,
	Symlink:               pb.EventId_symlink,
	Readlink:              pb.EventId_readlink,
	Chmod:                 pb.EventId_chmod,
	Fchmod:                pb.EventId_fchmod,
	Chown:                 pb.EventId_chown,
	Fchown:                pb.EventId_fchown,
	Lchown:                pb.EventId_lchown,
	Umask:                 pb.EventId_umask,
	Gettimeofday:          pb.EventId_gettimeofday,
	Getrlimit:             pb.EventId_getrlimit,
	Getrusage:             pb.EventId_getrusage,
	Sysinfo:               pb.EventId_sysinfo,
	Times:                 pb.EventId_times,
	Ptrace:                pb.EventId_ptrace,
	Getuid:                pb.EventId_getuid,
	Syslog:                pb.EventId_syslog,
	Getgid:                pb.EventId_getgid,
	Setuid:                pb.EventId_setuid,
	Setgid:                pb.EventId_setgid,
	Geteuid:               pb.EventId_geteuid,
	Getegid:               pb.EventId_getegid,
	Setpgid:               pb.EventId_setpgid,
	Getppid:               pb.EventId_getppid,
	Getpgrp:               pb.EventId_getpgrp,
	Setsid:                pb.EventId_setsid,
	Setreuid:              pb.EventId_setreuid,
	Setregid:              pb.EventId_setregid,
	Getgroups:             pb.EventId_getgroups,
	Setgroups:             pb.EventId_setgroups,
	Setresuid:             pb.EventId_setresuid,
	Getresuid:             pb.EventId_getresuid,
	Setresgid:             pb.EventId_setresgid,
	Getresgid:             pb.EventId_getresgid,
	Getpgid:               pb.EventId_getpgid,
	Setfsuid:              pb.EventId_setfsuid,
	Setfsgid:              pb.EventId_setfsgid,
	Getsid:                pb.EventId_getsid,
	Capget:                pb.EventId_capget,
	Capset:                pb.EventId_capset,
	RtSigpending:          pb.EventId_rt_sigpending,
	RtSigtimedwait:        pb.EventId_rt_sigtimedwait,
	RtSigqueueinfo:        pb.EventId_rt_sigqueueinfo,
	RtSigsuspend:          pb.EventId_rt_sigsuspend,
	Sigaltstack:           pb.EventId_sigaltstack,
	Utime:                 pb.EventId_utime,
	Mknod:                 pb.EventId_mknod,
	Uselib:                pb.EventId_uselib,
	Personality:           pb.EventId_personality,
	Ustat:                 pb.EventId_ustat,
	Statfs:                pb.EventId_statfs,
	Fstatfs:               pb.EventId_fstatfs,
	Sysfs:                 pb.EventId_sysfs,
	Getpriority:           pb.EventId_getpriority,
	Setpriority:           pb.EventId_setpriority,
	SchedSetparam:         pb.EventId_sched_setparam,
	SchedGetparam:         pb.EventId_sched_getparam,
	SchedSetscheduler:     pb.EventId_sched_setscheduler,
	SchedGetscheduler:     pb.EventId_sched_getscheduler,
	SchedGetPriorityMax:   pb.EventId_sched_get_priority_max,
	SchedGetPriorityMin:   pb.EventId_sched_get_priority_min,
	SchedRrGetInterval:    pb.EventId_sched_rr_get_interval,
	Mlock:                 pb.EventId_mlock,
	Munlock:               pb.EventId_munlock,
	Mlockall:              pb.EventId_mlockall,
	Munlockall:            pb.EventId_munlockall,
	Vhangup:               pb.EventId_vhangup,
	ModifyLdt:             pb.EventId_modify_ldt,
	PivotRoot:             pb.EventId_pivot_root,
	Sysctl:                pb.EventId_sysctl,
	Prctl:                 pb.EventId_prctl,
	ArchPrctl:             pb.EventId_arch_prctl,
	Adjtimex:              pb.EventId_adjtimex,
	Setrlimit:             pb.EventId_setrlimit,
	Chroot:                pb.EventId_chroot,
	Sync:                  pb.EventId_sync,
	Acct:                  pb.EventId_acct,
	Settimeofday:          pb.EventId_settimeofday,
	Mount:                 pb.EventId_mount,
	Umount2:               pb.EventId_umount2,
	Swapon:                pb.EventId_swapon,
	Swapoff:               pb.EventId_swapoff,
	Reboot:                pb.EventId_reboot,
	Sethostname:           pb.EventId_sethostname,
	Setdomainname:         pb.EventId_setdomainname,
	Iopl:                  pb.EventId_iopl,
	Ioperm:                pb.EventId_ioperm,
	CreateModule:          pb.EventId_create_module,
	InitModule:            pb.EventId_init_module,
	DeleteModule:          pb.EventId_delete_module,
	GetKernelSyms:         pb.EventId_get_kernel_syms,
	QueryModule:           pb.EventId_query_module,
	Quotactl:              pb.EventId_quotactl,
	Nfsservctl:            pb.EventId_nfsservctl,
	Getpmsg:               pb.EventId_getpmsg,
	Putpmsg:               pb.EventId_putpmsg,
	Afs:                   pb.EventId_afs,
	Tuxcall:               pb.EventId_tuxcall,
	Security:              pb.EventId_security,
	Gettid:                pb.EventId_gettid,
	Readahead:             pb.EventId_readahead,
	Setxattr:              pb.EventId_setxattr,
	Lsetxattr:             pb.EventId_lsetxattr,
	Fsetxattr:             pb.EventId_fsetxattr,
	Getxattr:              pb.EventId_getxattr,
	Lgetxattr:             pb.EventId_lgetxattr,
	Fgetxattr:             pb.EventId_fgetxattr,
	Listxattr:             pb.EventId_listxattr,
	Llistxattr:            pb.EventId_llistxattr,
	Flistxattr:            pb.EventId_flistxattr,
	Removexattr:           pb.EventId_removexattr,
	Lremovexattr:          pb.EventId_lremovexattr,
	Fremovexattr:          pb.EventId_fremovexattr,
	Tkill:                 pb.EventId_tkill,
	Time:                  pb.EventId_time,
	Futex:                 pb.EventId_futex,
	SchedSetaffinity:      pb.EventId_sched_setaffinity,
	SchedGetaffinity:      pb.EventId_sched_getaffinity,
	SetThreadArea:         pb.EventId_set_thread_area,
	IoSetup:               pb.EventId_io_setup,
	IoDestroy:             pb.EventId_io_destroy,
	IoGetevents:           pb.EventId_io_getevents,
	IoSubmit:              pb.EventId_io_submit,
	IoCancel:              pb.EventId_io_cancel,
	GetThreadArea:         pb.EventId_get_thread_area,
	LookupDcookie:         pb.EventId_lookup_dcookie,
	EpollCreate:           pb.EventId_epoll_create,
	EpollCtlOld:           pb.EventId_epoll_ctl_old,
	EpollWaitOld:          pb.EventId_epoll_wait_old,
	RemapFilePages:        pb.EventId_remap_file_pages,
	Getdents64:            pb.EventId_getdents64,
	SetTidAddress:         pb.EventId_set_tid_address,
	RestartSyscall:        pb.EventId_restart_syscall,
	Semtimedop:            pb.EventId_semtimedop,
	Fadvise64:             pb.EventId_fadvise64,
	TimerCreate:           pb.EventId_timer_create,
	TimerSettime:          pb.EventId_timer_settime,
	TimerGettime:          pb.EventId_timer_gettime,
	TimerGetoverrun:       pb.EventId_timer_getoverrun,
	TimerDelete:           pb.EventId_timer_delete,
	ClockSettime:          pb.EventId_clock_settime,
	ClockGettime:          pb.EventId_clock_gettime,
	ClockGetres:           pb.EventId_clock_getres,
	ClockNanosleep:        pb.EventId_clock_nanosleep,
	ExitGroup:             pb.EventId_exit_group,
	EpollWait:             pb.EventId_epoll_wait,
	EpollCtl:              pb.EventId_epoll_ctl,
	Tgkill:                pb.EventId_tgkill,
	Utimes:                pb.EventId_utimes,
	Vserver:               pb.EventId_vserver,
	Mbind:                 pb.EventId_mbind,
	SetMempolicy:          pb.EventId_set_mempolicy,
	GetMempolicy:          pb.EventId_get_mempolicy,
	MqOpen:                pb.EventId_mq_open,
	MqUnlink:              pb.EventId_mq_unlink,
	MqTimedsend:           pb.EventId_mq_timedsend,
	MqTimedreceive:        pb.EventId_mq_timedreceive,
	MqNotify:              pb.EventId_mq_notify,
	MqGetsetattr:          pb.EventId_mq_getsetattr,
	KexecLoad:             pb.EventId_kexec_load,
	Waitid:                pb.EventId_waitid,
	AddKey:                pb.EventId_add_key,
	RequestKey:            pb.EventId_request_key,
	Keyctl:                pb.EventId_keyctl,
	IoprioSet:             pb.EventId_ioprio_set,
	IoprioGet:             pb.EventId_ioprio_get,
	InotifyInit:           pb.EventId_inotify_init,
	InotifyAddWatch:       pb.EventId_inotify_add_watch,
	InotifyRmWatch:        pb.EventId_inotify_rm_watch,
	MigratePages:          pb.EventId_migrate_pages,
	Openat:                pb.EventId_openat,
	Mkdirat:               pb.EventId_mkdirat,
	Mknodat:               pb.EventId_mknodat,
	Fchownat:              pb.EventId_fchownat,
	Futimesat:             pb.EventId_futimesat,
	Newfstatat:            pb.EventId_newfstatat,
	Unlinkat:              pb.EventId_unlinkat,
	Renameat:              pb.EventId_renameat,
	Linkat:                pb.EventId_linkat,
	Symlinkat:             pb.EventId_symlinkat,
	Readlinkat:            pb.EventId_readlinkat,
	Fchmodat:              pb.EventId_fchmodat,
	Faccessat:             pb.EventId_faccessat,
	Pselect6:              pb.EventId_pselect6,
	Ppoll:                 pb.EventId_ppoll,
	Unshare:               pb.EventId_unshare,
	SetRobustList:         pb.EventId_set_robust_list,
	GetRobustList:         pb.EventId_get_robust_list,
	Splice:                pb.EventId_splice,
	Tee:                   pb.EventId_tee,
	SyncFileRange:         pb.EventId_sync_file_range,
	Vmsplice:              pb.EventId_vmsplice,
	MovePages:             pb.EventId_move_pages,
	Utimensat:             pb.EventId_utimensat,
	EpollPwait:            pb.EventId_epoll_pwait,
	Signalfd:              pb.EventId_signalfd,
	TimerfdCreate:         pb.EventId_timerfd_create,
	Eventfd:               pb.EventId_eventfd,
	Fallocate:             pb.EventId_fallocate,
	TimerfdSettime:        pb.EventId_timerfd_settime,
	TimerfdGettime:        pb.EventId_timerfd_gettime,
	Accept4:               pb.EventId_accept4,
	Signalfd4:             pb.EventId_signalfd4,
	Eventfd2:              pb.EventId_eventfd2,
	EpollCreate1:          pb.EventId_epoll_create1,
	Dup3:                  pb.EventId_dup3,
	Pipe2:                 pb.EventId_pipe2,
	InotifyInit1:          pb.EventId_inotify_init1,
	Preadv:                pb.EventId_preadv,
	Pwritev:               pb.EventId_pwritev,
	RtTgsigqueueinfo:      pb.EventId_rt_tgsigqueueinfo,
	PerfEventOpen:         pb.EventId_perf_event_open,
	Recvmmsg:              pb.EventId_recvmmsg,
	FanotifyInit:          pb.EventId_fanotify_init,
	FanotifyMark:          pb.EventId_fanotify_mark,
	Prlimit64:             pb.EventId_prlimit64,
	NameToHandleAt:        pb.EventId_name_to_handle_at,
	OpenByHandleAt:        pb.EventId_open_by_handle_at,
	ClockAdjtime:          pb.EventId_clock_adjtime,
	Syncfs:                pb.EventId_syncfs,
	Sendmmsg:              pb.EventId_sendmmsg,
	Setns:                 pb.EventId_setns,
	Getcpu:                pb.EventId_getcpu,
	ProcessVmReadv:        pb.EventId_process_vm_readv,
	ProcessVmWritev:       pb.EventId_process_vm_writev,
	Kcmp:                  pb.EventId_kcmp,
	FinitModule:           pb.EventId_finit_module,
	SchedSetattr:          pb.EventId_sched_setattr,
	SchedGetattr:          pb.EventId_sched_getattr,
	Renameat2:             pb.EventId_renameat2,
	Seccomp:               pb.EventId_seccomp,
	Getrandom:             pb.EventId_getrandom,
	MemfdCreate:           pb.EventId_memfd_create,
	KexecFileLoad:         pb.EventId_kexec_file_load,
	Bpf:                   pb.EventId_bpf,
	Execveat:              pb.EventId_execveat,
	Userfaultfd:           pb.EventId_userfaultfd,
	Membarrier:            pb.EventId_membarrier,
	Mlock2:                pb.EventId_mlock2,
	CopyFileRange:         pb.EventId_copy_file_range,
	Preadv2:               pb.EventId_preadv2,
	Pwritev2:              pb.EventId_pwritev2,
	PkeyMprotect:          pb.EventId_pkey_mprotect,
	PkeyAlloc:             pb.EventId_pkey_alloc,
	PkeyFree:              pb.EventId_pkey_free,
	Statx:                 pb.EventId_statx,
	IoPgetevents:          pb.EventId_io_pgetevents,
	Rseq:                  pb.EventId_rseq,
	PidfdSendSignal:       pb.EventId_pidfd_send_signal,
	IoUringSetup:          pb.EventId_io_uring_setup,
	IoUringEnter:          pb.EventId_io_uring_enter,
	IoUringRegister:       pb.EventId_io_uring_register,
	OpenTree:              pb.EventId_open_tree,
	MoveMount:             pb.EventId_move_mount,
	Fsopen:                pb.EventId_fsopen,
	Fsconfig:              pb.EventId_fsconfig,
	Fsmount:               pb.EventId_fsmount,
	Fspick:                pb.EventId_fspick,
	PidfdOpen:             pb.EventId_pidfd_open,
	Clone3:                pb.EventId_clone3,
	CloseRange:            pb.EventId_close_range,
	Openat2:               pb.EventId_openat2,
	PidfdGetfd:            pb.EventId_pidfd_getfd,
	Faccessat2:            pb.EventId_faccessat2,
	ProcessMadvise:        pb.EventId_process_madvise,
	EpollPwait2:           pb.EventId_epoll_pwait2,
	MountSetattr:          pb.EventId_mount_setattr,
	QuotactlFd:            pb.EventId_quotactl_fd,
	LandlockCreateRuleset: pb.EventId_landlock_create_ruleset,
	LandlockAddRule:       pb.EventId_landlock_add_rule,
	LandlockRestrictSelf:  pb.EventId_landlock_restrict_self,
	MemfdSecret:           pb.EventId_memfd_secret,
	ProcessMrelease:       pb.EventId_process_mrelease,
	Waitpid:               pb.EventId_waitpid,
	Oldfstat:              pb.EventId_oldfstat,
	Break:                 pb.EventId_break,
	Oldstat:               pb.EventId_oldstat,
	Umount:                pb.EventId_umount,
	Stime:                 pb.EventId_stime,
	Stty:                  pb.EventId_stty,
	Gtty:                  pb.EventId_gtty,
	Nice:                  pb.EventId_nice,
	Ftime:                 pb.EventId_ftime,
	Prof:                  pb.EventId_prof,
	Signal:                pb.EventId_signal,
	Lock:                  pb.EventId_lock,
	Mpx:                   pb.EventId_mpx,
	Ulimit:                pb.EventId_ulimit,
	Oldolduname:           pb.EventId_oldolduname,
	Sigaction:             pb.EventId_sigaction,
	Sgetmask:              pb.EventId_sgetmask,
	Ssetmask:              pb.EventId_ssetmask,
	Sigsuspend:            pb.EventId_sigsuspend,
	Sigpending:            pb.EventId_sigpending,
	Oldlstat:              pb.EventId_oldlstat,
	Readdir:               pb.EventId_readdir,
	Profil:                pb.EventId_profil,
	Socketcall:            pb.EventId_socketcall,
	Olduname:              pb.EventId_olduname,
	Idle:                  pb.EventId_idle,
	Vm86old:               pb.EventId_vm86old,
	Ipc:                   pb.EventId_ipc,
	Sigreturn:             pb.EventId_sigreturn,
	Sigprocmask:           pb.EventId_sigprocmask,
	Bdflush:               pb.EventId_bdflush,
	Afs_syscall:           pb.EventId_afs_syscall,
	Llseek:                pb.EventId_llseek,
	OldSelect:             pb.EventId_old_select,
	Vm86:                  pb.EventId_vm86,
	OldGetrlimit:          pb.EventId_old_getrlimit,
	Mmap2:                 pb.EventId_mmap2,
	Truncate64:            pb.EventId_truncate64,
	Ftruncate64:           pb.EventId_ftruncate64,
	Stat64:                pb.EventId_stat64,
	Lstat64:               pb.EventId_lstat64,
	Fstat64:               pb.EventId_fstat64,
	Lchown16:              pb.EventId_lchown16,
	Getuid16:              pb.EventId_getuid16,
	Getgid16:              pb.EventId_getgid16,
	Geteuid16:             pb.EventId_geteuid16,
	Getegid16:             pb.EventId_getegid16,
	Setreuid16:            pb.EventId_setreuid16,
	Setregid16:            pb.EventId_setregid16,
	Getgroups16:           pb.EventId_getgroups16,
	Setgroups16:           pb.EventId_setgroups16,
	Fchown16:              pb.EventId_fchown16,
	Setresuid16:           pb.EventId_setresuid16,
	Getresuid16:           pb.EventId_getresuid16,
	Setresgid16:           pb.EventId_setresgid16,
	Getresgid16:           pb.EventId_getresgid16,
	Chown16:               pb.EventId_chown16,
	Setuid16:              pb.EventId_setuid16,
	Setgid16:              pb.EventId_setgid16,
	Setfsuid16:            pb.EventId_setfsuid16,
	Setfsgid16:            pb.EventId_setfsgid16,
	Fcntl64:               pb.EventId_fcntl64,
	Sendfile32:            pb.EventId_sendfile32,
	Statfs64:              pb.EventId_statfs64,
	Fstatfs64:             pb.EventId_fstatfs64,
	Fadvise64_64:          pb.EventId_fadvise64_64,
	ClockGettime32:        pb.EventId_clock_gettime32,
	ClockSettime32:        pb.EventId_clock_settime32,
	ClockAdjtime64:        pb.EventId_clock_adjtime64,
	ClockGetresTime32:     pb.EventId_clock_getres_time32,
	ClockNanosleepTime32:  pb.EventId_clock_nanosleep_time32,
	TimerGettime32:        pb.EventId_timer_gettime32,
	TimerSettime32:        pb.EventId_timer_settime32,
	TimerfdGettime32:      pb.EventId_timerfd_gettime32,
	TimerfdSettime32:      pb.EventId_timerfd_settime32,
	UtimensatTime32:       pb.EventId_utimensat_time32,
	Pselect6Time32:        pb.EventId_pselect6_time32,
	PpollTime32:           pb.EventId_ppoll_time32,
	IoPgeteventsTime32:    pb.EventId_io_pgetevents_time32,
	RecvmmsgTime32:        pb.EventId_recvmmsg_time32,
	MqTimedsendTime32:     pb.EventId_mq_timedsend_time32,
	MqTimedreceiveTime32:  pb.EventId_mq_timedreceive_time32,
	RtSigtimedwaitTime32:  pb.EventId_rt_sigtimedwait_time32,
	FutexTime32:           pb.EventId_futex_time32,
	SchedRrGetInterval32:  pb.EventId_sched_rr_get_interval_time32,

	// Common events translation section
	NetPacketBase:                pb.EventId_net_packet_base,
	NetPacketIPBase:              pb.EventId_net_packet_ip_base,
	NetPacketTCPBase:             pb.EventId_net_packet_tcp_base,
	NetPacketUDPBase:             pb.EventId_net_packet_udp_base,
	NetPacketICMPBase:            pb.EventId_net_packet_icmp_base,
	NetPacketICMPv6Base:          pb.EventId_net_packet_icmpv6_base,
	NetPacketDNSBase:             pb.EventId_net_packet_dns_base,
	NetPacketHTTPBase:            pb.EventId_net_packet_http_base,
	NetPacketCapture:             pb.EventId_net_packet_capture,
	NetPacketFlow:                pb.EventId_net_packet_flow,
	MaxNetID:                     pb.EventId_max_net_id,
	SysEnter:                     pb.EventId_sys_enter,
	SysExit:                      pb.EventId_sys_exit,
	SchedProcessFork:             pb.EventId_sched_process_fork,
	SchedProcessExec:             pb.EventId_sched_process_exec,
	SchedProcessExit:             pb.EventId_sched_process_exit,
	SchedSwitch:                  pb.EventId_sched_switch,
	DoExit:                       pb.EventId_do_exit,
	CapCapable:                   pb.EventId_cap_capable,
	VfsWrite:                     pb.EventId_vfs_write,
	VfsWritev:                    pb.EventId_vfs_writev,
	VfsRead:                      pb.EventId_vfs_read,
	VfsReadv:                     pb.EventId_vfs_readv,
	MemProtAlert:                 pb.EventId_mem_prot_alert,
	CommitCreds:                  pb.EventId_commit_creds,
	SwitchTaskNS:                 pb.EventId_switch_task_ns,
	MagicWrite:                   pb.EventId_magic_write,
	CgroupAttachTask:             pb.EventId_cgroup_attach_task,
	CgroupMkdir:                  pb.EventId_cgroup_mkdir,
	CgroupRmdir:                  pb.EventId_cgroup_rmdir,
	SecurityBprmCheck:            pb.EventId_security_bprm_check,
	SecurityFileOpen:             pb.EventId_security_file_open,
	SecurityInodeUnlink:          pb.EventId_security_inode_unlink,
	SecuritySocketCreate:         pb.EventId_security_socket_create,
	SecuritySocketListen:         pb.EventId_security_socket_listen,
	SecuritySocketConnect:        pb.EventId_security_socket_connect,
	SecuritySocketAccept:         pb.EventId_security_socket_accept,
	SecuritySocketBind:           pb.EventId_security_socket_bind,
	SecuritySocketSetsockopt:     pb.EventId_security_socket_setsockopt,
	SecuritySbMount:              pb.EventId_security_sb_mount,
	SecurityBPF:                  pb.EventId_security_bpf,
	SecurityBPFMap:               pb.EventId_security_bpf_map,
	SecurityKernelReadFile:       pb.EventId_security_kernel_read_file,
	SecurityInodeMknod:           pb.EventId_security_inode_mknod,
	SecurityPostReadFile:         pb.EventId_security_post_read_file,
	SecurityInodeSymlinkEventId:  pb.EventId_security_inode_symlink_event_id,
	SecurityMmapFile:             pb.EventId_security_mmap_file,
	SecurityFileMprotect:         pb.EventId_security_file_mprotect,
	SocketDup:                    pb.EventId_socket_dup,
	ZeroedInodes:                 pb.EventId_zeroed_inodes,
	KernelWrite:                  pb.EventId_kernel_write,
	ProcCreate:                   pb.EventId_proc_create,
	KprobeAttach:                 pb.EventId_kprobe_attach,
	CallUsermodeHelper:           pb.EventId_call_usermode_helper,
	DirtyPipeSplice:              pb.EventId_dirty_pipe_splice,
	DebugfsCreateFile:            pb.EventId_debugfs_create_file,
	SyscallTableCheck:            pb.EventId_syscall_table_check,
	DebugfsCreateDir:             pb.EventId_debugfs_create_dir,
	DeviceAdd:                    pb.EventId_device_add,
	RegisterChrdev:               pb.EventId_register_chrdev,
	SharedObjectLoaded:           pb.EventId_shared_object_loaded,
	DoInitModule:                 pb.EventId_do_init_module,
	SocketAccept:                 pb.EventId_socket_accept,
	LoadElfPhdrs:                 pb.EventId_load_elf_phdrs,
	HookedProcFops:               pb.EventId_hooked_proc_fops,
	PrintNetSeqOps:               pb.EventId_print_net_seq_ops,
	TaskRename:                   pb.EventId_task_rename,
	SecurityInodeRename:          pb.EventId_security_inode_rename,
	DoSigaction:                  pb.EventId_do_sigaction,
	BpfAttach:                    pb.EventId_bpf_attach,
	KallsymsLookupName:           pb.EventId_kallsyms_lookup_name,
	DoMmap:                       pb.EventId_do_mmap,
	PrintMemDump:                 pb.EventId_print_mem_dump,
	VfsUtimes:                    pb.EventId_vfs_utimes,
	DoTruncate:                   pb.EventId_do_truncate,
	FileModification:             pb.EventId_file_modification,
	InotifyWatch:                 pb.EventId_inotify_watch,
	SecurityBpfProg:              pb.EventId_security_bpf_prog,
	ProcessExecuteFailed:         pb.EventId_process_execute_failed,
	SecurityPathNotify:           pb.EventId_security_path_notify,
	SetFsPwd:                     pb.EventId_set_fs_pwd,
	SuspiciousSyscallSource:      pb.EventId_suspicious_syscall_source,
	StackPivot:                   pb.EventId_stack_pivot,
	HiddenKernelModuleSeeker:     pb.EventId_hidden_kernel_module_seeker,
	ModuleLoad:                   pb.EventId_module_load,
	ModuleFree:                   pb.EventId_module_free,
	ExecuteFinished:              pb.EventId_execute_finished,
	ProcessExecuteFailedInternal: pb.EventId_process_execute_failed_internal,
	SecurityTaskSetrlimit:        pb.EventId_security_task_set_rlimit,
	SecuritySettime64:            pb.EventId_security_settime64,
	ChmodCommon:                  pb.EventId_chmod_common,
	SecuritySbUmount:             pb.EventId_security_sb_umount,
	SecurityTaskPrctl:            pb.EventId_security_task_prctl,

	// Events from user-space translation section
	NetPacketIPv4:         pb.EventId_net_packet_ipv4,
	NetPacketIPv6:         pb.EventId_net_packet_ipv6,
	NetPacketTCP:          pb.EventId_net_packet_tcp,
	NetPacketUDP:          pb.EventId_net_packet_udp,
	NetPacketICMP:         pb.EventId_net_packet_icmp,
	NetPacketICMPv6:       pb.EventId_net_packet_icmpv6,
	NetPacketDNS:          pb.EventId_net_packet_dns,
	NetPacketDNSRequest:   pb.EventId_net_packet_dns_request,
	NetPacketDNSResponse:  pb.EventId_net_packet_dns_response,
	NetPacketHTTP:         pb.EventId_net_packet_http,
	NetPacketHTTPRequest:  pb.EventId_net_packet_http_request,
	NetPacketHTTPResponse: pb.EventId_net_packet_http_response,
	NetFlowEnd:            pb.EventId_net_flow_end,
	NetFlowTCPBegin:       pb.EventId_net_flow_tcp_begin,
	NetFlowTCPEnd:         pb.EventId_net_flow_tcp_end,
	MaxUserNetID:          pb.EventId_max_user_net_id,
	NetTCPConnect:         pb.EventId_net_tcp_connect,
	InitNamespaces:        pb.EventId_init_namespaces,
	ContainerCreate:       pb.EventId_container_create,
	ContainerRemove:       pb.EventId_container_remove,
	ExistingContainer:     pb.EventId_existing_container,
	HookedSyscall:         pb.EventId_hooked_syscall,
	HookedSeqOps:          pb.EventId_hooked_seq_ops,
	SymbolsLoaded:         pb.EventId_symbols_loaded,
	SymbolsCollision:      pb.EventId_symbols_collision,
	HiddenKernelModule:    pb.EventId_hidden_kernel_module,
	FtraceHook:            pb.EventId_ftrace_hook,
}

// TranslateEventID translates an internal event ID to the corresponding protobuf Event ID.
// This function can be called independently of event conversion.
//
// For built-in events with protobuf mappings (ID <= MaxUserSpaceID), it uses the
// EventTranslationTable to map internal IDs to protobuf enum values. For events
// without protobuf mappings (capture, signal, signature, test events), it returns
// the internal ID directly as a protobuf EventId.
//
// Parameters:
//   - eventID: The internal event ID (can be int or ID type)
//
// Returns:
//   - The corresponding protobuf EventId
func TranslateEventID(eventID int) pb.EventId {
	// Only translate events that have protobuf enum mappings
	// (syscalls, common events, and user-space derived events)
	// Also translate Unsupported (9000) which marks unsupported syscalls on some architectures
	// Capture, signal, signature, and test events use their internal IDs as-is
	if (eventID >= 0 && eventID <= int(MaxUserSpaceID)) || eventID == int(Unsupported) {
		return EventTranslationTable[ID(eventID)]
	}
	return pb.EventId(eventID)
}
